from AIAssistant import AIAssistant
class DataAnalysisAssistant(AIAssistant):
    """子类：数据分析助手"""

    def __init__(self, aid: str, name: str, version: str, is_online: bool, ability_score: int,
                 supported_data_formats: str):
        super().__init__(aid, name, "数据分析", version, is_online, ability_score)
        self.supported_data_formats = supported_data_formats

    def execute_task(self, task_content: str) -> str:
        return f"[{self.get_name()}] 执行数据分析任务：\n任务内容：{task_content}\n处理结果：基于{self.supported_data_formats}格式数据完成统计分析，生成可视化报表"

    def get_supported_data_formats(self) -> str:
        return self.supported_data_formats

    def set_supported_data_formats(self, supported_data_formats: str) -> None:
        self.supported_data_formats = supported_data_formats

    def __str__(self) -> str:
        return super().__str__() + f", 支持数据格式: {self.supported_data_formats}"